#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>


int main()
{
  printf("process is running,only me!,pid:%d\n",getpid());
  sleep(3);
  pid_t id=fork();
  if(id==-1) return 1;
  else if(id==0)
  {
    //child
      printf("id:%d,i am child process,pid:%d,ppid:%d\n",id,getpid(),getppid());
      sleep(1);
    
  }
  else
  {
      //parent
      printf("id:%d,i am parent process,pid:%d,ppid:%d\n",id,getpid(),getppid());
      sleep(2);
  }
  sleep(5);
}
